package n.info.entities;

import java.util.ArrayList;
import java.util.List;

public class Feed {

	// ~ constants .................................................................................
	// ~ Static fields/initializers .............................................................
	// ~ Static methods ........................................................................
	// ~ Instance fields .........................................................................
	
	private FeedChannel channel ;
	private List<FeedItem> items ;
	
	// ~ Constructors ...........................................................................
	
	public Feed(){
		
	}
	
	public Feed(FeedChannel channel) {
	    this.channel = channel;
    }
	
	public Feed(FeedChannel channel, List<FeedItem> items) {
	    this.channel = channel;
	    this.items = items;
    }
	
	// ~ Properties ...............................................................................
	
	public FeedChannel getChannel() {
    	return channel;
    }

	public void setChannel(FeedChannel channel) {
    	this.channel = channel;
    }

	public List<FeedItem> getItems() {
    	return items;
    }

	public void setItems(List<FeedItem> items) {
    	this.items = items;
    }
	
	// ~ Abstract methods ...................................................................
	// ~ Abstract methods implementations .......................................
	// ~ Interface implementations ......................................................
	// ~ Methods ..................................................................................	
	
	public void addItem(FeedItem item){
		if(items == null)
			items = new ArrayList<FeedItem>() ;
		
		items.add(item);
	}
	
	// ~ Inner classes ...........................................................................
}
